﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ExoticCarRental
{
    public partial class login2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnLogin_Click(object sender, EventArgs e)
        {
            BusinessLayer bl = new BusinessLayer();
            if (bl.LoginCustomer(txtEmail.Text, txtPassword.Text) == 0)
            {
                //write ccokie for email and password + loggedin = true
                Response.Redirect("default.aspx");

            }
            else
            {
                //login failed, return login page and display login failed message 
                lblLoginFail.Text = "Login Failed";


            }



            
        }
    }
}
